package com.kaluli;

import java.util.Random;

public class TestNum {
	
	
	static Random random = new Random();
	static int base[] = {1,3,5,6,8};
	public static void main(String[] args) {
		
		
		int wei[] = new int[5];
		
		for (int i = 0; i < 5; i++) {
			wei[i]=Integer.valueOf(i);
//			System.out.println(wei[i]);
		}
		
		
		int num[]={};
		
		//万千求和
		StringBuffer bf = new StringBuffer();
		for(int i=0;i<10;i++){
			
			for(int j=0;j<10;j++){
//				j = getNumj(i,j);
				if(i+j == base[0] + base[1]){
					continue;
				}
				for(int k =0;k<10;k++){
					if(i+j+k == base[0] + base[1]+base[2]){
						continue;
					}
					for(int a =0;a<10;a++){
						if(i+j+k+a == base[0] + base[1]+base[2]+base[3]){
							continue;
						}
//						System.out.println(i+"-"+j+"-"+k+"-"+a);
						if(j+k+a ==base[1]+base[2]+base[3]){
							continue;
						}
						if(k+a ==base[2]+base[3]){
							continue;
						}
						for(int b =0;b<10;b++){
							if(a+b ==base[3]+base[4]){
								continue;
							}
							if(k+a+b ==base[2]+base[3]+base[4]){
								continue;
							}
							if(j+k+a+b ==base[1]+base[2]+base[3]+base[4]){
								continue;
							}
							String str1 = "a+b";
							String str2 = "base[3]+base[4]";
							if(str1 == str2){
								continue;
							}
							bf.append(i+"");
							bf.append(j+"");
							bf.append(k+"");
							bf.append(a+"");
							bf.append(b+"");
							bf.append("\t");
						}
						
					}
				}
			}
			
		}
		System.out.println(bf.toString());
		
	}
	
	public static int getNumj(int i,int j){
		
		if(i+j == base[0] + base[1]){
			j =random.nextInt(10);
			getNumj(i,j);
		}
		return j;
	}

}
